with Ada.Strings.Unbounded;    use Ada.Strings.Unbounded;
with TJa.Calendar;             use TJa.Calendar;
with TJa.Sockets;              use TJa.Sockets;
with Soma_Solver;              use Soma_Solver;
with Structure;                use Structure;

package Protocol is

   procedure Get_Line(Socket : in Socket_Type; Text : in out Unbounded_String);

   procedure Put_Line(Socket : in Socket_Type; Text : in Unbounded_String);

   function Create_Message(Header  : in Character;
                           Content : in Unbounded_String) return Unbounded_String;

   function Get_Header(Message : in Unbounded_String) return Character;

   function Get_Body(Message : in Unbounded_String) return Unbounded_String;

   function Get_Figures(Content : in Unbounded_String) return Integer;

   function Get_Nth_Figure(Content : in Unbounded_String;
                           N       : in Integer) return String;

   function Get_Solution(Content : in Unbounded_String) return String;

   function Get_Traverse(Content : in Unbounded_String;
                         N       : in Integer) return String;

   function Put_Orientation(List : in Figure_List) return Unbounded_String;

    function Get_Figure_Number(Content : in Unbounded_String) return Integer;

end Protocol;
